﻿Imports DTO
Public Class DichVuDuocDat_DAL
    Dim connect As Connection
    Dim stringCommand As String
    Dim dichVuDuocDat As DichVuDuocDat
    Dim ds_DichVuDuocDat As List(Of DichVuDuocDat)

    Public Function LoadData() As List(Of DichVuDuocDat)
        connect = New Connection()
        stringCommand = "Select * From DichVuDuocDat"
        ds_DichVuDuocDat = New List(Of DichVuDuocDat)
        Dim dt As New DataTable()
        dt = connect.LoadData(stringCommand)
        For i As Integer = 0 To dt.Rows.Count - 1
            Dim id As Integer = dt.Rows(i)(0)
            Dim tiecCuoi As Integer = dt.Rows(i)(1)
            Dim dichVu As Integer = dt.Rows(i)(2)
            dichVuDuocDat = New DichVuDuocDat(id, tiecCuoi, dichVu)
            ds_DichVuDuocDat.Add(dichVuDuocDat)
        Next
        Return ds_DichVuDuocDat
    End Function
End Class
